﻿ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Presenters;

namespace University.Workshop.Tests
{
    public class MockProvider:IProvider
    {
        string searchWord;
        bool enable;
        #region IProvider Members
        public string Search
        {
            get { return searchWord; }

        }

        public bool Active
        {
            get { return enable; }
        }

        public string ModifyName
        {
            get;
            set;
        }

        public string ModifyEmail
        {
            get;
            set;
        }

        public string ModifyWeb
        {
            get;
            set;
        }

        public string ModifyContact
        {
            get;
            set;
        }

        public string ModifyCellular
        {
            get;
            set;
        }

        public string ModifyTelephone
        {
            get;
            set;
        }

        public string ModifyAddress
        {
            get;
            set;
        }

        public string ModifyNit
        {
            get;
            set;
        }
        #endregion
        #region Methods Search
        public void ValidSearchEnable()
        {
            searchWord = "1";
            enable = true;
        }
        public void ValidSearchDisable()
        {
            searchWord = "1";
            enable = false;
        }
        public void ValidSearchNull()
        {
            searchWord = "x";
            enable = true;
        }
        public void SearchEmpty()
        {
            searchWord = string.Empty;
            enable = true;
        }
        public void SearchInvalidChars()
        {
            searchWord = "x'";
            enable = true;
        }
        public void SearchInvalidLenght()
        {
            searchWord = "xsdkjfhalsjbhgfladshgasdfbjas";
            enable = true;
        }
        #endregion
        #region SetProvider
        public void SetProvider()
        {
            ModifyNit = "64082354";

        }
        #endregion
        #region UpdateProvider
        public void ModifyProviderValid()
        {
            ModifyAddress = "Canada cbba Esq Nestor Salazar #143";
            ModifyName = "Laboratorios INTI";
            ModifyEmail = "laboratorios@hotmail.com";
            ModifyWeb = "www.inti.com.bo";
            ModifyContact = "Roberto";
            ModifyCellular = "72270122";
            ModifyTelephone = "4020064";
            ModifyAddress = "Av America";
            ModifyNit = "1214568";

        }

        public void ModifyProviderNameInvalid()
        {
            this.ModifyProviderValid();
            ModifyName = "Laborator'ios INTI";
        }

        public void ModifyProviderNameInvalidLenght()
        {
            this.ModifyProviderValid();
            ModifyName = "asdijfbhasdklfbgalsibfhaskjldaklsgaskjlghasldkjhaosdifhadsfiuoasfhasldfjbasldjfkhasdfkjla";
        }

        public void ModifyProviderNameEmpty()
        {
            this.ModifyProviderValid();
            ModifyName = string.Empty;
        }

        public void ModifyProviderAddressInvalid()
        {
            this.ModifyProviderValid();
            ModifyAddress = "asnfjasdf' asjbnas";
        }

        public void ModifyProviderAddressLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyAddress = "ijasdbfvajsbfsadb asdhlfbgasldbfsadifsaidfbgasdlgfasdkjfgasdkjfgskjadgfsjfaskdjfgaskd";
        }

        public void ModifyProviderAddressEmpty()
        {
            this.ModifyProviderValid();
            ModifyAddress = string.Empty;
        }

        public void ModifyProviderPhonesEmpty()
        {
            this.ModifyProviderValid();
            ModifyCellular = string.Empty;
            ModifyTelephone = string.Empty;
        }

        public void ModifyProviderTelephoneInvalid()
        {
            this.ModifyProviderValid();
            ModifyTelephone = "324664g";
        }

        public void ModifyProviderCellularInvalid()
        {
            this.ModifyProviderValid();
            ModifyCellular = "3245r453";
        }

        public void ModifyProviderTelephoneLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyTelephone = "23453767568";
        }

        public void ModifyProviderCellularLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyCellular = "3453246757548754";
        }

        public void ModifyProviderContactNameLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyContact = "asdjfabgsdgfabsdkjfbsbfskajldbfsakbfaskhdfbvashfvashdv";
        }

        public void ModifyProviderContactNameInvalidChars()
        {
            this.ModifyProviderValid();
            ModifyContact="kdjfsaldjf'asdfasd";
        }

        public void ModifyProviderEmailInvalid()
        {
            this.ModifyProviderValid();
            ModifyEmail = "sahfsadfbasd";
        }

        public void ModifyProviderWebInvalid()
        {
            this.ModifyProviderValid();
            ModifyWeb = "asdkjfbaskjdf";
        }

        public void ModifyProviderWebLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyWeb = "www.skadbfkjadsbfkhasbfsadbfuasbgasiudbgashugbadsklbfsafbsasdfhasdfkj.goo";
        }
        public void ModifyProviderEmailLenghtInvalid()
        {
            this.ModifyProviderValid();
            ModifyEmail = "jadbsfvhjadbsfkjlasdbfasldbgaskjdgbaskdgjasdgbk@hotmail.com";
        }
        public void PrividerExistInvalid()
        {
            ModifyNit = "1214568";
        }

        #endregion

    }
}
